<?php
namespace app\api\controller;

use app\api\model\VideoModel;
use think\Controller;

class Video extends Controller
{
    function videodetail() {
        $videoid = input('get.videoid');
        $model = new VideoModel();
        $result = $model->videodetail($videoid);
        if ($result) {
            return json_encode($result);
        }else {
            return  json_encode(['id'=>0]);
        }

    }
    function videolist() {
        $model = new VideoModel();
        $result = $model->videolist();
        return json_encode($result);
    }
}